<template>
	<u-tabbar :value="current" zIndex="999" activeColor="#55C29A" inactiveColor="#666666" :border="false" placeholder safeAreaInsetBottom>

		<u-tabbar-item text="首页" @click="onClickItem('/pages/home/index')">
			<image class="tabbr-ioc" slot="active-icon" src="@/static/images/tab-bar/1-2.png"></image>
			<image class="tabbr-ioc" slot="inactive-icon" src="@/static/images/tab-bar/1-1.png"></image>
		</u-tabbar-item>

		<u-tabbar-item text="工单" @click="onClickItem('/pages/order/index')">
			<image class="tabbr-ioc" slot="active-icon" src="@/static/images/tab-bar/2-2.png"></image>
			<image class="tabbr-ioc" slot="inactive-icon" src="@/static/images/tab-bar/2-1.png"></image>
		</u-tabbar-item>

		<u-tabbar-item text="我的" @click="onClickItem('/pages/user/index')">
			<image class="tabbr-ioc" slot="active-icon" src="@/static/images/tab-bar/3-2.png"></image>
			<image class="tabbr-ioc" slot="inactive-icon" src="@/static/images/tab-bar/3-1.png"></image>
		</u-tabbar-item>



	</u-tabbar>
</template>

<script>
	export default {
		props: {
			current: {
				type: Number,
				default: 0
			},
		},

		created() {
			uni.hideTabBar() //隐藏底部导航栏
		},
		methods: {
			onClickItem(path) {
				uni.switchTab({
					url: path
				})
			},
		}

	}
</script>

<style lang="scss" scoped>
	.tabbr-ioc {
		width: 40rpx;
		height: 40rpx;
	}
	::v-deep .u-tabbar__content{
		box-shadow: 0rpx -3rpx 4rpx 0rpx rgba(0,0,0,0.04);
	}
</style>